<?xml version="1.0" encoding="utf-8" ?>
<?extension Tools.VisualStudioT.GeneratorsT.XsdGenerator.Extensions.NoEmptyRemarks?>
<?extension Tools.VisualStudioT.GeneratorsT.XsdGenerator.Extensions.OnChangingCall?>
<?extension "Tools.VisualStudioT.GeneratorsT.XsdGenerator.Extensions.RemoveTypeAttribute" type="System.Diagnostics.DebuggerStepThroughAttribute"?>
<?extension Tools.VisualStudioT.GeneratorsT.XsdGenerator.Extensions.OnAfterInitCall?>
<?extension "Tools.VisualStudioT.GeneratorsT.XsdGenerator.Extensions.AddPropertyAttribute" PropertyName="separator_" TypeName="CsvTemplateSettings" Name="System.ComponentModel.BrowsableAttribute" p-0="System.Boolean False"?>
<?extension "Tools.VisualStudioT.GeneratorsT.XsdGenerator.Extensions.AddPropertyAttribute" PropertyName="separator_" TypeName="CsvTemplateSettings" Name="System.ComponentModel.EditorBrowsableAttribute" p-0="System.ComponentModel.EditorBrowsableState Never"?>
<xs:schema id="CsvTemplateSettings"
                  targetNamespace="urn:eos-ksi/KolUni/Reporting/Csv"
                  elementFormDefault="qualified"
                  xmlns="urn:eos-ksi/KolUni/Reporting/Csv"
                  xmlns:csv="urn:eos-ksi/KolUni/Reporting/Csv"
                  xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="CsvTemplateSettings" type="CsvTemplateSettings">
        <xs:annotation>
            <xs:documentation>A XML-Schema used for storing configuration of CsvTemplate</xs:documentation>
            <xs:appinfo>
                <sd:schemaDoc xmlns:sd="http://schemas.xsddoc.codeplex.com/schemaDoc/2009/3" xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                    <summary>
                        <para>
                            A XML-Schema used for storing configuration of <codeEntityReference qualifyHint="true">T:Tools.ReportingT.ReportingEngineLite.CsvTemplate</codeEntityReference>
                        </para>
                    </summary>
                    <remarks>
                        <content>
                            <title xmlns="http://www.w3.org/1999/xlink"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="titleEltType">Version history</title>
                            <list class="nobullet">
                                <listItem>
                                    <para>1.5.3</para>
                                    <list class="bullet">
                                        <listItem>
                                            <para>This schema is new in version 1.5.3</para>
                                        </listItem>
                                    </list>
                                </listItem>
                            </list>
                        </content>
                    </remarks>
                    <relatedTopics>
                        <codeEntityReference qualifyHint="true">T:Tools.ReportingT.ReportingEngineLite.CsvTemplateSettings</codeEntityReference>
                        <codeEntityReference qualifyHint="true">T:Tools.ReportingT.ReportingEngineLite.CsvTemplate</codeEntityReference>
                    </relatedTopics>
                </sd:schemaDoc>
            </xs:appinfo>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="CsvTemplateSettings">
        <xs:annotation>
            <xs:documentation>Stores CsvTemplate settings</xs:documentation>
            <xs:appinfo>
                <sd:schemaDoc xmlns:sd="http://schemas.xsddoc.codeplex.com/schemaDoc/2009/3" xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                    <summary>
                        <para>
                            Stores <codeEntityReference qualifyHint="true">T:Tools.ReportingT.ReportingEngineLite.CsvTemplate</codeEntityReference> settings.
                        </para>
                    </summary>
                    <relatedTopics>
                        <codeEntityReference qualifyHint="true">T:Tools.ReportingT.ReportingEngineLite.CsvTemplateSettings</codeEntityReference>
                        <codeEntityReference qualifyHint="true">T:Tools.ReportingT.ReportingEngineLite.CsvTemplate</codeEntityReference>
                    </relatedTopics>
                </sd:schemaDoc>
            </xs:appinfo>
        </xs:annotation>
        <xs:attribute name="encoding" type="xs:string" use="optional" default="">
            <xs:annotation>
                <xs:documentation>An encoding. If not set system-default encoding is used. Also the special value System also means system-default encoding.</xs:documentation>
                <xs:appinfo>
                    <sd:schemaDoc xmlns:sd="http://schemas.xsddoc.codeplex.com/schemaDoc/2009/3" xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                        <summary>
                            <para>An encoding. If not set system-default encoding is used.</para>
                        </summary>
                        <remarks>
                            <content>
                                <para>
                                    In addition an to empty string also the special value <codeInline>System</codeInline> also means system-default encoding.
                                </para>
                            </content>
                        </remarks>
                    </sd:schemaDoc>
                </xs:appinfo>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="culture" type="xs:string" use="optional" default="">
            <xs:annotation>
                <xs:documentation>
                    A culture used for output data formatting. If not set invariant culture is used.
                    Recognized special values: Current - CurrentCulture, CurrentUI - CurrentUICulture, System - InstalledUICulture, Invariant - InvariantCulture
                </xs:documentation>
                <xs:appinfo>
                    <sd:schemaDoc xmlns:sd="http://schemas.xsddoc.codeplex.com/schemaDoc/2009/3" xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                        <summary>
                            <para>A culture used for output data formatting. If not set invariant culture is used.</para>
                        </summary>
                        <remarks>
                            <content>
                                <para>Special values are recognized:</para>
                                <definitionTable>
                                    <definedTerm>
                                        <codeInline>Current</codeInline>
                                    </definedTerm>
                                    <definition>
                                        <para>
                                            Current culture (<codeEntityReference qualifyHint="true">P:System.Globalization.CultureInfo.CurrentCulture</codeEntityReference>)
                                        </para>
                                    </definition>
                                    <definedTerm>
                                        <codeInline>CurrentUI</codeInline>
                                    </definedTerm>
                                    <definition>
                                        <para>
                                            Current UI culture (<codeEntityReference qualifyHint="true">P:System.Globalization.CultureInfo.CurrentUICulture</codeEntityReference>)
                                        </para>
                                    </definition>
                                    <definedTerm>
                                        <codeInline>System</codeInline>
                                    </definedTerm>
                                    <definition>
                                        <para>
                                            UI culture of current system installation (<codeEntityReference qualifyHint="true">P:System.Globalization.CultureInfo.InstalledUICulture</codeEntityReference>)
                                        </para>
                                    </definition>
                                    <definedTerm>
                                        <codeInline>Invariant</codeInline>
                                    </definedTerm>
                                    <definition>
                                        <para>
                                            Invariant culture (<codeEntityReference qualifyHint="true">P:System.Globalization.CultureInfo.InvariantCulture</codeEntityReference>)
                                        </para>
                                    </definition>
                                </definitionTable>
                            </content>
                        </remarks>
                    </sd:schemaDoc>
                </xs:appinfo>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="number-format" type="xs:string" use="optional" default="">
            <xs:annotation>
                <xs:documentation>Output number format (using specified culture). If empty default is used.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="date-format" type="xs:string" use="optional" default="">
            <xs:annotation>
                <xs:documentation>Output date format (using specified culture). If empty default is used.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="time-format" type="xs:string" use="optional" default="">
            <xs:annotation>
                <xs:documentation>Ouput time format (using specified culture). If not empty default is used. Uses Tools.TimeSpanFormattable (not System.TimeSpan)!</xs:documentation>
                <xs:appinfo>
                    <sd:schemaDoc xmlns:sd="http://schemas.xsddoc.codeplex.com/schemaDoc/2009/3" xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5">
                        <summary>
                            <para>Ouput time format (using specified culture). If not empty default is used. Uses <codeEntityReference qualifyHint="true">T:Tools.TimeSpanFormattable</codeEntityReference> (not <codeEntityReference qualifyHint="true">T:System.TimeSpan</codeEntityReference>)!</para>
                        </summary>
                    </sd:schemaDoc>
                </xs:appinfo>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="separator_" use="required">
            <xs:annotation>
                <xs:documentation>Column separator character</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:union memberTypes="char">
                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                            <xs:enumeration value="\t">
                                <xs:annotation>
                                    <xs:documentation>Tabulator</xs:documentation>
                                </xs:annotation>
                            </xs:enumeration>
                            <xs:enumeration value="\s">
                                <xs:annotation>
                                    <xs:documentation>Space</xs:documentation>
                                </xs:annotation>
                            </xs:enumeration>
                            <xs:enumeration value="System">
                                <xs:annotation>
                                    <xs:documentation>Use default culture-specific column separator</xs:documentation>
                                </xs:annotation>
                            </xs:enumeration>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:union>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="text-qualifier" use="required" type="char">
            <xs:annotation>
                <xs:documentation>Text qualifier (quotes)</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="text-qualifier-usage" use="optional" default="as-needed">
            <xs:annotation>
                <xs:documentation>Indicates when to use taxt qualifier</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="as-needed">
                        <xs:annotation>
                            <xs:documentation>Use only when necessary</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="always">
                        <xs:annotation>
                            <xs:documentation>Use always</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="always-on-text">
                        <xs:annotation>
                            <xs:documentation>Use always for text values. Use when necessary for dates and numbers.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="text-qualifier-escape" use="optional" default="double">
            <xs:annotation>
                <xs:documentation>How to expace text qualifier?</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="double">
                        <xs:annotation>
                            <xs:documentation>Make id double (as quote in VB)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="escape">
                        <xs:annotation>
                            <xs:documentation>Prepend it with backslash (\; as quote in C#)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="html">
                        <xs:annotation>
                            <xs:documentation>Replace it with HTML/XML entity (like " goes &amp;quot; in HTML/XML)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="do-nothing">
                        <xs:annotation>
                            <xs:documentation>Do not escape it.</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="new-line" use="optional" default="CrLf">
            <xs:annotation>
                <xs:documentation>How to start a new line</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="CrLf">
                        <xs:annotation>
                            <xs:documentation>Use windows new line indicator (\r\n / CrLf)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="LineFeed">
                        <xs:annotation>
                            <xs:documentation>Use line feed character (\n, Lf)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="CarriageReturn">
                        <xs:annotation>
                            <xs:documentation>Use carriage return character (\r, Cr)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="NextLine">
                        <xs:annotation>
                            <xs:documentation>Use Unicode next line character (nl)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="FormFeed">
                        <xs:annotation>
                            <xs:documentation>Use Unicode form feed character (ff)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="LineSeparator">
                        <xs:annotation>
                            <xs:documentation>Use Unicode line separator character (ls)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="ParagraphSeparator">
                        <xs:annotation>
                            <xs:documentation>Use Unicode paragraph separator character (ps)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="System">
                        <xs:annotation>
                            <xs:documentation>Use current platform native character (i.e. CrLf on Windows)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="nl-escape" use="optional" default="replace-all-with-escape">
            <xs:annotation>
                <xs:documentation>How to deal with line brekas inside text</xs:documentation>
            </xs:annotation>
            <xs:simpleType>
                <xs:restriction base="xs:string">
                    <xs:enumeration value="replace-all-with-escape">
                        <xs:annotation>
                            <xs:documentation>Replace all line breaks with appropriate escape sequence</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="replace-with-escape">
                        <xs:annotation>
                            <xs:documentation>Replace only those specified in new-line attribute with appropriate escape sequence</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="escape-all">
                        <xs:annotation>
                            <xs:documentation>Prepend all of them with backslash (\; CrLf goes \Cr\Lf)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="escape">
                        <xs:annotation>
                            <xs:documentation>Prepend only those specified in new-line attribute with backslash (\; CrLf goes \Cr\Lf)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="special-replace">
                        <xs:annotation>
                            <xs:documentation>Replace them with a special character (only those specified in new-line attribute)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="special-replace-all">
                        <xs:annotation>
                            <xs:documentation>Replace them all with same special character</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="strip">
                        <xs:annotation>
                            <xs:documentation>Remove them (only thos specified in new-line attribute)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="strip-all">
                        <xs:annotation>
                            <xs:documentation>Remove them all</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="html">
                        <xs:annotation>
                            <xs:documentation>Replace them with HTML/XML entity (only thos specified in new-line attribute)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="html-all">
                        <xs:annotation>
                            <xs:documentation>Replace them all with HTML/XML entity</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="do-nothing">
                        <xs:annotation>
                            <xs:documentation>Do nothing (just use text-qualifier)</xs:documentation>
                        </xs:annotation>
                    </xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>
        <xs:attribute name="special-string" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A special string (used to replace line breaks). Its escaped using the rule define din text-qualifier-escape attribute. The escape vallue cuases backslash (\) to be prepended in front of entire string (not all single characters of the string).</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="header" type="xs:boolean" use="optional" default="false">
            <xs:annotation>
                <xs:documentation>Indicates whether to write data-source column names to header</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="footer" type="xs:boolean" use="optional" default="false">
            <xs:annotation>
                <xs:documentation>Indicate whether to write data-source column names to footer</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="header-size" type="xs:integer" use="optional" default="0">
            <xs:annotation>
                <xs:documentation>Number of header lines in template file (when used). Rest of template file becomes footer.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
        <xs:attribute name="null-value" type="xs:string" use="optional">
            <xs:annotation>
                <xs:documentation>A string inserted instead of NULL value.</xs:documentation>
            </xs:annotation>
        </xs:attribute>
    </xs:complexType>

    <xs:simpleType name="char">
        <xs:annotation>
            <xs:documentation>Specifies 1-character long character type</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:maxLength value="1"/>
            <xs:minLength value="1"/>
        </xs:restriction>
    </xs:simpleType>
</xs:schema>
